const express = require("express");
//创建路由
let config = express.Router();


//配置文件根路由
config.get("/", (req, res) => {


});

config.get('/config.js', (req, res) => {
  res.type('application/javascript');
  res.send(`
      window.__ENV__ = ${JSON.stringify({
    SERVER_IP: process.env.SERVER_IP,
    HOME_SERVER_IP: process.env.HOME_SERVER_IP,
    LIFEMOMENT_SERVER_IP: process.env.LIFEMOMENT_SERVER_IP,
    ATLAS_SERVER_IP: process.env.ATLAS_SERVER_IP,
    USER_SERVER_IP: process.env.USER_SERVER_IP,
  })}
    `);
});


module.exports = config;